import { ConsultInfo } from "@/types/consult";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useConsultStore = defineStore('consult', () => {
    // 1. 定义数据
    const type = ref('')
    const illnessType = ref('')
    const depId = ref('')

    const illnessInfo = ref<ConsultInfo>({
      illnessDesc: '', // 病情描述
      illnessTime: 1, // 患病时间
      consultFlag: 0, // 是否就诊
      pictures: [], // 图片数组
    })
    return { type, illnessType, depId, illnessInfo}
}, {
    unistorage: true
})